package com.netposa.datawarehouse.statistics.service;

import com.google.common.collect.Maps;
import java.util.Map;
import org.redisson.api.RedissonClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LoginService {
   @Autowired
   RedissonClient redissonClient;

   public Map loginCount() {
      Map returnVal = Maps.newHashMap();
      returnVal.put("count", (Integer)this.redissonClient.getBucket("logincount:all").get());
      returnVal.put("today", (Integer)this.redissonClient.getBucket("logincount:today").get());
      return returnVal;
   }
}
